
export function say(txt) {
  return "say " + txt
}

export function prn(msg, ...rest) {
  const stack = new Error().stack;
  const callerLines = stack.split('\n').slice(2); // 跳过第一行和第二行，因为它们不是调用者
  const caller = callerLines[0].trim(); // 返回调用者的行

  // console.log('--stack--', stack)
  // console.log('--caller--', caller)
  let caller_filename = ''
  if (caller) {
    const callerMatches = caller.match(/(.*):(\d+):(\d+)/);
    // console.log(callerMatches)
    if (callerMatches) {
      caller_filename = callerMatches[1];
    }
  }
  console.log('\n', caller_filename, ' : \n\n', msg, ...rest, )
}


export function test_import(argument) {
  print('test_import ok!')
}